<template>
  <div class="home">
    {{ user.id  }}
    <HelloWorld msg="我是传递到子组件的参数" />
    <div :style="{ fontSize: postFontSize + 'em' }">
      <buttonCounter
        tt="我是测试tt"
        :userContent="user"
        @enlarge-text="postFontSize += 0.1"
        >我是插槽</buttonCounter
      >
    </div>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";
import ButtonCounter from "@/components/ButtonCounter.vue";

export default {
  name: "Home",
  data() {
    return {
      user: {
        id: 1,
        name: "张三",
        psd: "123",
      },
      postFontSize: 1,
    };
  },
  components: {
    HelloWorld,
    ButtonCounter,
  },
};
</script>
